#ifndef CBASETITLEBAR_H
#define CBASETITLEBAR_H

#include <QWidget>

class CBaseTitleBar : public QWidget {
    Q_OBJECT
    Q_PROPERTY(QColor titleColor READ titleColor WRITE setTitleColor NOTIFY titleColorChanged)
public:
    explicit CBaseTitleBar(QWidget *parent = nullptr);
    ~CBaseTitleBar();

public:
    QColor titleColor() const;
    void setTitleColor(const QColor &titleColor);

    virtual bool isMouseFree() const;

    bool barVisible() const;
    void setBarVisible(bool visible);

protected:
    QColor m_titleColor;

    bool m_barVisible;

    virtual void updateBarVisible();

signals:
    void titleColorChanged();
};

#endif // CBASETITLEBAR_H
